const App = getApp()
Page({
  data: {
    userInfo: {},
    grzx: App.myUlife.ulifeUrl + '/wx/grzx.jpg',
    ulifeUrl: App.myUlife.ulifeUrl
  },
  onLoad: function () {
    var that = this;
    var openid = wx.getStorageSync('openid');

    if (openid == "") {
      wx.reLaunch({
        url: '../../pages/index/index'
      })
    } else {
      var userInfo = {
        city: wx.getStorageSync('city'),
        province: wx.getStorageSync('province'),
        gender: wx.getStorageSync('gender'),
        nickName: wx.getStorageSync('nickName'),
        avatarUrl: wx.getStorageSync('avatarUrl'),
        openid: wx.getStorageSync('openid')
      }
      that.setData({
        userInfo: userInfo
      });
    } 
  },


  returnindex: function () {
    wx.reLaunch({
      url: '../../pages/wode/wode'
    })
  }
 

})